<?php
/**
 * Created by PhpStorm.
 * User: mayn
 * Date: 2018/8/31
 * Time: 13:04
 */

namespace app\api\model;

use think\Model;

class Article extends Model
{
    protected $autoWriteTimestamp = true;

    public static function listArticle($page, $size) {
        return self::paginate($size, false, ['page' => $page]);
    }

    public static function readArticle($id) {
        return self::get($id);
    }

    public static function updateArticle($data) {
        return self::update($data);
    }
}